<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021/10/19
  Time: 12:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Search</title>
</head>
<script type="text/javascript" src="/js/jquery-3.6.0.js"></script>
<script type="text/javascript" src="/js/zby.js"></script>
<link rel="stylesheet" href="/css/zby.css">

<body class="body">
<div style="width: 1525px;height:auto;min-height:720px;position: absolute;background-size: cover;background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#b8c4cb), to(#f6f6f8));">

    <div style=" width: 1000px;height: 50px;margin-top: 50px;margin-left: 480px">
        <div class="search" style="margin: 0 0 0 0;float: left">
            <input id="detail" name="detail" placeholder="输入搜索内容">
            <button onclick="search()">
                <img src="static/img/search.jpg">搜索
            </button>
            <select id="select">
                <option selected value="全部">全部</option>
                <option value="ISBN">ISBN</option>
                <option value="书名">书名</option>
                <option value="作者">作者</option>
                <option value="出版社">出版社</option>
                <option value="主要内容">主要内容</option>
                <option value="主题">主题</option>
            </select>
        </div>
        <div class="bookNavigation">

            <ul>
                <a href="/index">
                    <li>首页</li>
                </a>
                <a href="789" target="_blank">
                    <li style="border-right: none"> 个人中心</li>
                </a>
            </ul>

        </div>
    </div>

    <div style="width: 1523px;border-top: 1px solid #FFFFFF;margin-top: 30px;margin-bottom: 30px"></div>

    <div class="bookContent" id="bookContent">


    </div>


</div>
</body>
</html>

<script>
    bookList = ${bookList};
    detail = "${detail}";
    select = "${select}";


    $(document).ready(function () {
        $("#detail").val(detail);
        $("#select option[value=" + select + "]").attr("selected", "selected");
        if(bookList.length!=0)
            writeList(bookList);
        else
            alert("没有找到相关内容！");
    })






</script>